package tech.aistar.pojo;

/**
 * @author Ray
 * @version 1.0
 * @description:本类用来演示:
 * @date 2019/9/5  18:51
 */
public class Phone {
    private Integer id;
    private String name;
    private Double price;
    //包邮
    private Integer free;
    //信息
    private String intro;
    private Integer typeId;
    private String url;
    private Integer status;//0显示,1禁用

    public Phone() {
    }

    public Phone(Integer id, String name, Double price, Integer free, String intro, Integer typeId, String url, Integer status) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.free = free;
        this.intro = intro;
        this.typeId = typeId;
        this.url = url;
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Phone phone = (Phone) o;

        return id != null ? id.equals(phone.id) : phone.id == null;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getFree() {
        return free;
    }

    public void setFree(Integer free) {
        this.free = free;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Phone{");
        sb.append("id=").append(id);
        sb.append(", name='").append(name).append('\'');
        sb.append(", price=").append(price);
        sb.append(", free=").append(free);
        sb.append(", intro='").append(intro).append('\'');
        sb.append(", typeId=").append(typeId);
        sb.append(", url='").append(url).append('\'');
        sb.append(", status=").append(status);
        sb.append('}');
        return sb.toString();
    }
}
